import React, { useState } from 'react'
import MyHead from '../../components/MyHead'
import { Tabs } from 'antd-mobile'
import LoginByName from '../../components/LoginByName'
import LoginByPhone from '../../components/LoginByPhone'

const Login = () => {
    const [activeKey, setActiveKey] = useState('account')
    return (
        <div className='login pg' >
            <MyHead title='登录' />
            <div className="login-box">
                <Tabs activeKey={activeKey} onChange={key => setActiveKey(key)} >
                    <Tabs.Tab title='账号登录' key='account' >
                        <LoginByName />
                    </Tabs.Tab>
                    <Tabs.Tab title='手机登录' key='phone' >
                        <LoginByPhone />
                    </Tabs.Tab>
                </Tabs>
            </div>
        </div>
    )
}

export default Login